Free Hosting

Comments


Comments:-How to write the comments in C++ program,first of all why we required comments. Acutely when C++ programs are written it is necessary to keep track that what is the main working of a particular function ,what operation will be performed by a C++ statement, so we write a comment .Here is the methods to write C++ Comments:-

              //Comments


      /*Comments when to write in multiple lines*/

In these two comments the upper one is used when the comments are for only of one line.The lower one is used when the comments are written in multiple lines.

Examples:-

/* This program is written by my ,this program is written in C++ Language*/
#include<iostrean.h>
int main()              //This is main Function
{
     cout<<”Hellp”;      //This will print hello on the screen
            return 0;
}

0 comments:

Blogger Template by Clairvo